<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>零食</title>
</head>
<style>
    *{
        margin: 0;
        padding: 0;
    }

    ul{
        list-style: none;
    }

    :root{
        --width:1000px;
    }
    .box{
        width: var(--width);
        margin: 30px auto 0;
        border:1px solid black;
    }

    .food-list {
        display: flex;
        flex-wrap: wrap;
        padding: 0 calc((var(--width) - 200*4px) / 10) calc((var(--width) - 200*4px) / 10);
    }
    .food-list>li {
        position: relative;
        width: 200px;
        height:200px;
        background: url(./images/food1.webp) center / cover no-repeat;
        margin: calc((var(--width) - 200*4px)/10) calc((var(--width) - 200*4px) / 10) 0;
    }
    .food-list .mask {
        position:absolute;
        left:0;
        right:0;
        top:0;
        bottom: 0;
        background-color: rgba(0, 0, 0, .5);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        color: white;
        padding: 10px;
        transform: scale(0);
        transition: transform 0.3s linear 0.1s;

    }
    .food-list>li:hover .mask{
        transform: scale(1);
    }
    .food-list .title {
        font-size: 20px;
        padding: 10px 0;
    }
    .food-list .desc, .food-list .price {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
    }
    .food-list .desc {
        font-size: 18px;
    }
    .food-list .price {
        font-size: 14px;
    }
</style>
<body>
    <div class="box">
        <ul class="food-list">
            <li>
                <div class="mask">
                    <div class="title">【N上新口味】稻香村绿豆冰糕桂花味网红零食抹茶</div>
                    <div class="desc">
                        <span>天猫超市</span>
                        <span>北京</span>
                    </div>
                    <div class="price">
                        <span>¥39.90</span>
                        <span>69人付款</span>
                    </div>
                </div>
            </li>
            <li>                <div class="mask">
                <div class="title">【N上新口味】稻香村绿豆冰糕桂花味网红零食抹茶</div>
                <div class="desc">
                    <span>天猫超市</span>
                    <span>北京</span>
                </div>
                <div class="price">
                    <span>¥39.90</span>
                    <span>69人付款</span>
                </div>
            </div></li>
            <li>                <div class="mask">
                <div class="title">【N上新口味】稻香村绿豆冰糕桂花味网红零食抹茶</div>
                <div class="desc">
                    <span>天猫超市</span>
                    <span>北京</span>
                </div>
                <div class="price">
                    <span>¥39.90</span>
                    <span>69人付款</span>
                </div>
            </div></li>
            <li>                <div class="mask">
                <div class="title">【N上新口味】稻香村绿豆冰糕桂花味网红零食抹茶</div>
                <div class="desc">
                    <span>天猫超市</span>
                    <span>北京</span>
                </div>
                <div class="price">
                    <span>¥39.90</span>
                    <span>69人付款</span>
                </div>
            </div></li>
            <li>                <div class="mask">
                <div class="title">【N上新口味】稻香村绿豆冰糕桂花味网红零食抹茶</div>
                <div class="desc">
                    <span>天猫超市</span>
                    <span>北京</span>
                </div>
                <div class="price">
                    <span>¥39.90</span>
                    <span>69人付款</span>
                </div>
            </div></li>
            <li>                <div class="mask">
                <div class="title">【N上新口味】稻香村绿豆冰糕桂花味网红零食抹茶</div>
                <div class="desc">
                    <span>天猫超市</span>
                    <span>北京</span>
                </div>
                <div class="price">
                    <span>¥39.90</span>
                    <span>69人付款</span>
                </div>
            </div></li>
            <li>                <div class="mask">
                <div class="title">【N上新口味】稻香村绿豆冰糕桂花味网红零食抹茶</div>
                <div class="desc">
                    <span>天猫超市</span>
                    <span>北京</span>
                </div>
                <div class="price">
                    <span>¥39.90</span>
                    <span>69人付款</span>
                </div>
            </div></li>
        </ul>
    </div>
    
</body>
</html>